import alertTmp from './alert.html';
import alertCtrl from './alert.ctrl.js';

class Alert {
    constructor($uiModal) {
        "ngInject"
        this._uiModal = $uiModal;
    }
    open(opt, callback) {
       
        this._uiModal.open({
            templateUrl: alertTmp,
            controller: alertCtrl,
            controllerAs: 'vm',
            windowClass: 'alert-dialog alert-dialog-ctg',
            resolve: {
                alert: function() {
                    return opt;
                }
            }
        }).result.then(callback);
    }

}

export default Alert;